package org.example.design.strategy;

import java.math.BigDecimal;

/**
 * @Classname Context
 * @Description 策略控制类
 * @Date 2020/11/11 5:04 下午
 * @Created by xiangjd
 */
public class Context<T> {

    private ICouponDiscount<T> iCouponDiscount;

    public Context(ICouponDiscount<T> iCouponDiscount) {
        this.iCouponDiscount = iCouponDiscount;
    }

    public BigDecimal disCount(T couponInfo, BigDecimal skuPrive) {
        return iCouponDiscount.disCount(couponInfo, skuPrive);
    }
}
